package org.sbear.boot;


import org.sbear.client.RPCConsumer;
import org.sbear.serivice.UserService;
import org.sbear.zookeeper.UrlListService;


/**
 * @author xxyWi
 */
public class ClientBootStrap {

    public static void main(String[] args) throws InterruptedException {

        UrlListService.Init();

        RPCConsumer rpcConsumer = new RPCConsumer();
        UserService proxy = (UserService) rpcConsumer.createProxy(UserService.class, "UserService", "sayHello");

        while (true) {
            try {
                String s = proxy.sayHello("123456");
            } catch (Exception e) {
                System.out.println(e);
            }
            Thread.sleep(1000);
        }
    }
}
